﻿using System;
using Newtonsoft.Json;

namespace ChinaTax.LeQi
{
    public class QueryTaxpayerInfoRequest : Request<QueryTaxpayerInfoResponse>
    {
        public QueryTaxpayerInfoRequest()
        {
            ServiceCode = "CXNSRJBXX";
        }

        [JsonProperty("nsrsbh")]
        public string TaxNo { get => LeQiConfig.TaxNo; }
    }

    public class QueryTaxpayerInfoResponse : Response
    {
        [JsonProperty("jcxx")]
        public TaxpayerInfo Info { get; set; }
    }

    public class TaxpayerInfo
    {
        [JsonProperty("nsrsbh")]
        public string TaxNo { get; set; }

        [JsonProperty("djxh")]
        public string RegisterNumber { get; set; }

        [JsonProperty("ssdabh")]
        public string TaxArchiveNo { get; set; }

        [JsonProperty("nsrmc")]
        public string TaxpayerName { get; set; }

        [JsonProperty("nsrlx")]
        public string TaxpayerType { get; set; }

        [JsonProperty("scjydz")]
        public string Addr { get; set; }

        [JsonProperty("zcdyzbm")]
        public string PostCode { get; set; }

        [JsonProperty("zcdlxdh")]
        public string Phone { get; set; }

        [JsonProperty("fddbrxm")]
        public string LegalPerson { get; set; }

        [JsonProperty("djzclxdm")]
        public string RegisterType { get; set; }

        [JsonProperty("hydm")]
        public string IndustryCode { get; set; }

        [JsonProperty("qxjswjgdm")]
        public string DistrictTaxAuthorityCode { get; set; }

        [JsonProperty("zgswskfjdm")]
        public string TaxAuthorityCode { get; set; }

        [JsonProperty("zgswskfjmc")]
        public string TaxAuthorityName { get; set; }

        [JsonProperty("cwfzrxm")]
        public string FinanceChief { get; set; }

        [JsonProperty("khhmc")]
        public string AccountName { get; set; }

        [JsonProperty("yhzh")]
        public string AccountNo { get; set; }
    }

}
